package com.hmsproject.datastructures.transactions;

import java.util.Date;

import com.hmsproject.datastructures.deal.Deal;

public class Transaction {
	
	private int transacionIDStatic = 0;
	
	public Transaction(String userId, Deal deal, UserPreferences userPreferences, Date transactionDate,int totalCost){
		this.userId = userId;
		this.deal = deal;
		this.userPreferences = userPreferences;
		this.transactionId = transacionIDStatic++ + "";
		this.transactionDate = transactionDate;
		this.totalCost = totalCost;
	}
	
	private Transaction(){}
	
	private int totalCost;
	
	public int getTotalCost() {
		return totalCost;
	}

	public void setTotalCost(int totalCost) {
		this.totalCost = totalCost;
	}

	public String getTransactionId() {
		return transactionId;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public Deal getDeal() {
		return deal;
	}
	public void setDealId(Deal deal) {
		this.deal = deal;
	}
	private String transactionId;
	private String userId;
	private Deal deal;
	private UserPreferences userPreferences;
	private Date transactionDate;
	private int noOfRoomsBooked;
	
	public int getNoOfRoomsBooked() {
		return userPreferences.getNoOfRooms();
	}

	public Date getTransactionDate() {
		return transactionDate;
	}

	public void setTransactionDate(Date transactionDate) {
		this.transactionDate = transactionDate;
	}

	public UserPreferences getUserPreferences() {
		return userPreferences;
	}
	public void setUserPreferences(UserPreferences userPreferences) {
		this.userPreferences = userPreferences;
	}

}
